#ifndef CONNECTIONMANAGER_H
#define CONNECTIONMANAGER_H

#include <QDialog>
#include <QDebug>
#include <QtSql>

namespace Ui {
    class ConnectionManager;
}

class ConnectionManager : public QDialog
{
    Q_OBJECT

public:
    explicit ConnectionManager(QWidget *parent = 0);
    ~ConnectionManager();
    QSqlDatabase connectionsDatabase;
    bool connectionBeingCreated;
    void CreateNewTable();
    void PopulateConnectionsListWidget();
    void ClearBoxes();
    Ui::ConnectionManager *ui;
    int threadnum;

private:

signals:
    void UpdateSideDock();
    void connectPushed(QString conName);
    void disconnectPushed(QString conName);

private slots:

    void buttonPushed();
    void disconnectButtonPushed();

    void SaveIsClicked();
    void ItemSelected();
    void DeleteConnection();
    void CheckIfConnectionExists();
    void ClearAllBoxes();
    void CreateNewConnection();

};

#endif // CONNECTIONMANAGER_H
